<?php
    
    class suitclient_saas_init
    {
        function __construct() {
            $this->model = app::get('suitclient') -> model('server');
        }
        
        function setup($info = array()) {
            $config = $info['config'];
            $bind = $info['bind'];
            foreach ( (array) $config as $key => $value) {
                app::get('suitclient')->setConf($key, $value); 
            }
            $this->model->db->exec('TRUNCATE TABLE `sdb_suitclient_server`');
            $this->model->insert($bind); 
        }
    }
